package hl.fildir;

import java.io.*;

public class FileOutputStreamTest {

    public static void main(String[] args){

        try (var fos = new FileOutputStream("FileOutPutStream.txt");
             var fis = new FileInputStream("hello.txt") )
        {
            var bbuf = new byte[32];
            var hasRead = 0;
            while ((hasRead = fis.read(bbuf)) > 0){
                fos.write(bbuf,0, hasRead);
            }
        }
        catch (IOException ioe)
        {
            ioe.printStackTrace();
        }
    }
}
